package com.kaifamiao.www.IP.do0928;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

public class Client {
    public static void main(String[] args) {
        try {
//            Scanner scanner = new Scanner(System.in);
//            String str =scanner.nextLine();
            Socket socket = new Socket("10.0.2.60",8889);

            OutputStream outputStream = socket.getOutputStream();
            String str = "用户爱坤 向你发来问候";
            byte[] bytes = str.getBytes();
            outputStream.write(bytes);
            System.out.println("发送成功");
            socket.shutdownOutput();
//            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
